<template>
<view>
	<image class="topbg" src="../../static/image/Frame1.png" mode=""></image>
	<view class="news-details">
		<view class="header">
			<view class="title xxl m-b-20" style="color: #5d361f;">{{ articleDetail.title }}</view>
<!-- 			<view class="flex row-between">
				<view class="xs lighter" style="color: #916446;">发布时间：{{ articleDetail.create_time }}</view>
				<view class="flex">
					<image class="icon-sm" src="/static/images/icon_see.png"></image>
					<view class="m-l-10 xs muted" style="color: #5d361f;">{{ articleDetail.visit }}人浏览</view>
				</view>
			</view> -->
		</view>
		<view class="main margin30">
			<u-parse :html="article_content" />
		</view>
		<image class="frame" src="../../static/image/Frame.png" mode="" @click="apifun.navigate('/bundle/pages/faddish')"></image>
	</view>
<loading-view v-if="showLoading"></loading-view>
</view>
</template>

<script>

import { getArticleDetail } from '@/api/store';

export default {
  data() {
    return {
      showLoading: true,
      articleDetail: {},
      article_content: ""
    };
  },

  components: {
  },
  props: {},

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.type = Number(options.type) || '';
    this.id = options.id;

    if (this.type) {
      uni.setNavigationBarTitle({
        title: '帮助详情'
      });
    } else {
      uni.setNavigationBarTitle({
        title: '资讯详情'
      });
    }

    this.getArticleDetailFun();
  },

 
  methods: {
    getArticleDetailFun() {
      getArticleDetail({
        type: this.type,
        id: this.id
      }).then(res => {
        if (res.code == 1) {
          this.articleDetail = res.data
          setTimeout(() => {
            this.article_content = res.data.content;
          }, 200);
          setTimeout(() => {
              this.showLoading = false
          }, 300);
        }
      });
    }

  }
};
</script>
<style lang="scss">
page {
    background-color: #fef3dd;
}
.news-details{
	position: absolute;
	top: 20rpx;
	z-index: 9;
}
.news-details .header{
    padding: 20rpx 15px;
    // border-bottom: $-solid-border;
}
.news-details .main {
    padding: 40rpx 15px;
	background-color: #fffcf4;
	border-radius: 18rpx;
	margin-top: 30rpx;
	padding-bottom: 50rpx;
	color: #676664;
	line-height: 44rpx;
}
.topbg{
	width: 100%;
	z-index: 8;
}
.frame{
	margin: 0 30rpx;
	margin-top: 50rpx;
	width: 690rpx;
	height: 190rpx;
}

video{
	width: 100%;
}

</style>